package com.manfred.time;

import java.util.Date;

public class TimeUtils {
	public static void main(String[] args) {
		Long current = System.currentTimeMillis();
		double daysRunOffD = current * 1.0 / (24 * 60 * 60 * 1000L);
		long daysRunOffL = current / (24 * 60 * 60 * 1000L);
		// System.out.println(daysRunOffD);
		// System.out.println(daysRunOffL);
		double hoursMargin = (daysRunOffD - daysRunOffL) * 24;
		long hoursMarginL = (long) ((daysRunOffD - daysRunOffL) * 24);
		long minsMarginL = (long) ((hoursMargin - hoursMarginL) * 60);
		System.out.println(daysRunOffL);
		System.out.println(hoursMarginL);
		System.out.println(minsMarginL);
		System.out
				.println((((hoursMargin - hoursMarginL) * 60) - minsMarginL) * 60);
		System.out.println(new Date(current));
		
		System.out.println(new Date(-4713298430157L));
	}
}
